package com.vt.admin.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.vt.admin.api.entity.SysMenu;
import com.vt.admin.mapper.SysMenuMapper;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@AllArgsConstructor
public class SysMenuService extends ServiceImpl<SysMenuMapper, SysMenu> {

    private final SysMenuMapper sysMenuMapper;

    public List<SysMenu> getMenuUrlByUserId(String id) {
        return sysMenuMapper.getMenuUrlByUserId(id);
    }

    public List<SysMenu> getAllMenuUrl() {
        return sysMenuMapper.selectList(new QueryWrapper());
    }
}
